using System;
using System.Collections;
using System.Diagnostics;

namespace CUtil
{
	/// <summary>
	/// Summary description for StringUtil.
	/// </summary>
	public class StringUtil
	{
		#region Constructors and Destructors

		public StringUtil()
		{
		}

		#endregion

	

		#region Class StringArrayCreator

		/// <summary>
		/// Summary description for CStringArrayCreator.
		/// </summary>
		public class StringArrayCreator
		{
		#region Constructors and Destructors

			/// <summary>
			/// CStringArrayCreator
			/// </summary>
			public StringArrayCreator()
			{
			}

		#endregion

		#region Methods Public

			/// <summary>
			/// stringToAddArray
			/// Creates a StringArray from a ArrayList of Strings
			/// </summary>
			/// <param name="parStringArrayList"></param>
			/// <returns></returns>
			public string[] stringToAddArray(ArrayList parStringArrayList)
			{
				try
				{
					return (string[])parStringArrayList.ToArray(typeof(string));
				}
				catch (Exception exc)
				{
					Debug.WriteLine
						("Error creating StringArray from ArrayList: " + exc.Message);
				}
				return null;
			}

		#endregion
		}

		#endregion

	

	

		
	}
}
